package com.cskaoyan.controller;

import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.bean.vo.BaseRespVo;
import com.cskaoyan.domain.MarketUser;
import com.cskaoyan.domain.WxMarketCollection;
import com.cskaoyan.service.CollectionService;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author stone
 * @date 2023/06/15 11:17
 */
/*@RestController
@RequestMapping("wx/collect")
public class WxCollectionController {

    @Autowired
    CollectionService collectionService;

    @RequestMapping("list")
    public BaseRespVo list(Byte type, Integer page, Integer limit) {
        // 做面向用户的系统的话，需要考虑到用户的信息 → 不能查询到其他的用户
        // 用户信息 可以来源于Shiro安全框架，但是我们现在没讲Shiro
        // 先给他写死，然后整合完shiro之后，再把等号右侧的值改为来源于shiro
        Subject subject = SecurityUtils.getSubject();
        if (subject.isAuthenticated()) {
            // 建议 已经登录之后再拿信息
        }
        MarketUser principal = (MarketUser) subject.getPrincipal();
        Integer userId = principal.getId();

        //CommonData<WxMarketCollection> data = collectionService.list(type, userId, page, limit);

        return BaseRespVo.ok();
    }
}*/
